package com.wyzz.hr.pojo.base;

import java.io.Serializable;
import java.util.Date;

import com.wyzz.hr.pojo.Department;
import com.wyzz.hr.pojo.Emphistdept;
import com.wyzz.hr.pojo.Employee;

public abstract class BaseEmphistdept implements Serializable {

	public BaseEmphistdept() {
		hashCode = 0x80000000;
		initialize();
	}

	public BaseEmphistdept(Integer id) {
		hashCode = 0x80000000;
		setId(id);
		initialize();
	}

	public BaseEmphistdept(Integer id, Employee ehdEmpNo, Department ehdDeptNo,
			Date ehdValidFrom, Integer ehdIsLatest) {
		hashCode = 0x80000000;
		setId(id);
		setEhdEmpNo(ehdEmpNo);
		setEhdDeptNo(ehdDeptNo);
		setEhdValidFrom(ehdValidFrom);
		setEhdIsLatest(ehdIsLatest);
		initialize();
	}

	protected void initialize() {
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
		hashCode = 0x80000000;
	}

	public Date getEhdValidFrom() {
		return ehdValidFrom;
	}

	public void setEhdValidFrom(Date ehdValidFrom) {
		this.ehdValidFrom = ehdValidFrom;
	}

	public Date getEhdValidTo() {
		return ehdValidTo;
	}

	public void setEhdValidTo(Date ehdValidTo) {
		this.ehdValidTo = ehdValidTo;
	}

	public Integer getEhdIsLatest() {
		return ehdIsLatest;
	}

	public void setEhdIsLatest(Integer ehdIsLatest) {
		this.ehdIsLatest = ehdIsLatest;
	}

	public Employee getEhdEmpNo() {
		return ehdEmpNo;
	}

	public void setEhdEmpNo(Employee ehdEmpNo) {
		this.ehdEmpNo = ehdEmpNo;
	}

	public Department getEhdDeptNo() {
		return ehdDeptNo;
	}

	public void setEhdDeptNo(Department ehdDeptNo) {
		this.ehdDeptNo = ehdDeptNo;
	}

	public boolean equals(Object obj) {
		if (null == obj)
			return false;
		if (!(obj instanceof Emphistdept))
			return false;
		Emphistdept emphistdept = (Emphistdept) obj;
		if (null == getId() || null == emphistdept.getId())
			return false;
		else
			return getId().equals(emphistdept.getId());
	}

	public int hashCode() {
		if (0x80000000 == hashCode) {
			if (null == getId())
				return super.hashCode();
			String hashStr = (new StringBuilder()).append(getClass().getName())
					.append(":").append(getId().hashCode()).toString();
			hashCode = hashStr.hashCode();
		}
		return hashCode;
	}

	public String toString() {
		return super.toString();
	}

	public static String REF = "Emphistdept";
	public static String PROP_EHD_VALID_TO = "ehdValidTo";
	public static String PROP_EHD_IS_LATEST = "ehdIsLatest";
	public static String PROP_EHD_VALID_FROM = "ehdValidFrom";
	public static String PROP_EHD_DEPT_NO = "ehdDeptNo";
	public static String PROP_EHD_EMP_NO = "ehdEmpNo";
	public static String PROP_ID = "id";
	private int hashCode;
	private Integer id;
	private Date ehdValidFrom;
	private Date ehdValidTo;
	private Integer ehdIsLatest;
	private Employee ehdEmpNo;
	private Department ehdDeptNo;

}
